﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects;

namespace Common {
  /// <summary>
  /// Settings Singleton
  /// </summary>
  public class SettingsSingleton {

    private static SettingsSingleton settings = new SettingsSingleton( );
    private User currentUser;
    private bool firstRun;
    private int appId, smtpPort;

    private string smtpServerName, smtpUserName, systemEmail;

    /// <summary>
    /// Prevents a default instance of the <see cref="SettingsSingleton"/> class from being created.
    /// </summary>
    private SettingsSingleton( ) { }

    /// <summary>
    /// Gets the settings.
    /// </summary>
    public static SettingsSingleton Settings { get { return settings; } }

    /// <summary>
    /// Gets or sets the current user.
    /// </summary>
    /// <value>
    /// The current user.
    /// </value>
    public User CurrentUser {
      get { return currentUser; }
      set { currentUser = value; }
    }

    /// <summary>
    /// Gets or sets a value indicating whether [first run].
    /// </summary>
    /// <value>
    ///   <c>true</c> if [first run]; otherwise, <c>false</c>.
    /// </value>
    public bool FirstRun {
      get { return firstRun; }
      set { firstRun = value; }
    }

    /// <summary>
    /// Gets or sets the app id.
    /// </summary>
    /// <value>
    /// The app id.
    /// </value>
    public int AppId {
      get { return appId; }
      set { appId = value; }
    }

    /// <summary>
    /// Gets or sets the send to email.
    /// </summary>
    /// <value>
    /// The send to email.
    /// </value>
    public string SystemEmail {
      get { return systemEmail; }
      set { systemEmail = value; }
    }

    /// <summary>
    /// Gets or sets the name of the SMTP user.
    /// </summary>
    /// <value>
    /// The name of the SMTP user.
    /// </value>
    public string SmtpUserName {
      get { return smtpUserName; }
      set { smtpUserName = value; }
    }

    /// <summary>
    /// Gets or sets the name of the SMTP server.
    /// </summary>
    /// <value>
    /// The name of the SMTP server.
    /// </value>
    public string SmtpServerName {
      get { return smtpServerName; }
      set { smtpServerName = value; }
    }

    /// <summary>
    /// Gets or sets the SMTP port.
    /// </summary>
    /// <value>
    /// The SMTP port.
    /// </value>
    public int SmtpPort {
      get { return smtpPort; }
      set { smtpPort = value; }
    }
    /// <summary>
    /// Gets the SMTP password.
    /// </summary>
    public string SmtpPassword { get { return "Dcms2011"; } } //TODO : Paswoord mag niet hard-coded. Moet hier nog uit!

  }
}
